# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=microsocks
pkgver=1.0.3
pkgrel=1
pkgdesc='Tiny, portable SOCKS5 server with very moderate resource usage'
arch=('loong64' 'x86_64')
url='https://github.com/rofl0r/microsocks'
license=('MIT')
depends=('glibc')
source=(https://github.com/rofl0r/microsocks/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
sha512sums=('cd2b4a689a4502e56900a87f88d09283a872fe367e4e0e1957800a32e195492d641266a1f2f85f861a135d6a207db92d2f0058785b80dfbf436d8ea805ca9322')

build() {
  cd $pkgname-$pkgver
  make
}

package() {
  cd $pkgname-$pkgver
  make prefix=/usr DESTDIR="$pkgdir" install

  install -Dm644 COPYING -t "$pkgdir"/usr/share/licenses/$pkgname/
}
